package com.nanuminc.market;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;

public class SplashApp extends Activity {
	//This class is for viewing the first page (layout.splash) and delay for 3 seconds - Ngocdtd
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);

        initialize();
    }

    private void initialize() {
        Handler handler = new Handler() {
        	@Override
        	public void handleMessage(Message msg) {
        		
           		Intent intent = getIntent();
		   		setResult(RESULT_OK, intent);
        		finish();    // 액티비티 종료
        	}      	
        };
        Toast.makeText(this, "Ngoc's modified app", Toast.LENGTH_LONG).show();
        handler.sendEmptyMessageDelayed(0, 3000);    // ms, 3초후 종료시킴
    }
}